import request from "../utils/request";
export const queryAllApi = ()=> { //查询部门
  return request.get('/depts');
}
export const addApi = (data)=> { //新增部门
  return request.post('/depts', data);
}
//根据id查询部门
export const queryByIdApi = (id)=> {
  return request.get(`/depts/${id}`);
}
//修改部门
export const updateApi = (data)=> {
  return request.put(`/depts`, data);
}
//删除部门
export const deleteApi = (id)=> {
  return request.delete(`/depts?id=${id}`); 
}